SUBROUTINE LABEL1
* Display a simple form, requesting entry of a name in single* Editbox. The Editbox has an associated label.* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
* Start the HTML page.CALL RW_START_HTML_PAGE("Label example", "", "", "", "")* Prompt the user.CALL RW_PUT("Please enter your name in the box, then click the Go button")* Start the form.CALL RW_START_HTML_FORM("HELLO","FORM1","")* To give the Editbox a label, we first put the Editbox in a string.
txtName = ""
CALL RWA_EDIT_BOX(txtName, "txtName", 30, "")* Then we enclose the Editbox in the label.CALL RWS_LABEL(txtName, "Name: ", "")* Output to two controls.CALL RW_PUT(txtName)CALL RW_SUBMIT_BUTTON("GO","") ;* Give the form a submit button.CALL RW_END_FORM ;* Complete the form.CALL RW_END_PAGE ;* Complete the page.
RETURN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><META NAME="Generator" CONTENT="Reality"><TITLE>Label example</TITLE></HEAD><BODY>
Please enter your name in the box, then click the Go button
<FORM ACTION="HELLO" NAME="FORM1" METHOD="POST"><LABEL>Name: <INPUT NAME="txtName" SIZE="30" TYPE="TEXT"></LABEL><INPUT TYPE="submit" VALUE="GO"></FORM></BODY></HTML>